import request from '@/utils/request'

export default {
    // 1.讲师列表（条件查询分页）
    // 2.current当前页，limit每页记录数，teacherQuery查询条件对象
    addCourseInfo(info) {
        return request({
            url: `/eduservice/course/addcourse`,
            method: 'post',
            data: info,
          })
    },
    getCourseInfo(id) {
        return request({
            url: `/eduservice/course/getCourseInfo/${id}`,
            method: 'get',
          })
    },
    updateCourseInfo(info) {
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data: info
          })
    },
    //课程确认信息
    getPublishCourseInfo(id){
        return request({
            url: `/eduservice/course/getPublishCourseInfo/${id}`,
            method: 'get',
          })
    },
    //发布课程
    PublishCourse(id){
        return request({
            url: `/eduservice/course/publishCourse/${id}`,
            method: 'post',
          })
    },
    //课程列表
    getCourseList(current,limit,courseQuery){
        return request({
            url: `/eduservice/course/getCourseListByPage/${current}/${limit}`,
            method: 'post',
            data: courseQuery
          })
    },
    // 删除课程
    deleteCourseInfo(id){
        return request({
            url: `/eduservice/course/deleteCourse/${id}`,
            method: 'delete',
          })
    }

}